feat(intl): implement Temporal.PlainYearMonth.prototype.toLocaleString#5098
feat(intl): implement Temporal.PlainYearMonth.prototype.toLocaleString#5098alienx5499 wants to merge 3 commits intoboa-dev:mainfrom
Conversation
Test262 conformance changes
Fixed tests (1):Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5098 +/- ##
===========================================
+ Coverage 47.24% 59.85% +12.61%
===========================================
Files 476 582 +106
Lines 46892 63445 +16553
===========================================
+ Hits 22154 37977 +15823
- Misses 24738 25468 +730 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f11323d to
fceb44a
Compare
| Ok(JsString::from(year_month.inner.to_string()).into()) | ||
| #[cfg(feature = "intl")] | ||
| { | ||
| use crate::builtins::{ |
There was a problem hiding this comment.
issue: the implementation here should ideally follow or adapt the specification steps provided in the Temporal specification as additions to ECMA402
Test262 conformance changes
Fixed tests (1):Broken tests (1):Tested main commit: |
This Pull Request fixes/closes #5083.
It changes the following:
Temporal.PlainYearMonth.prototype.toLocaleStringper spec, using the sharedformat_date_time_localepipeline (same pattern asDate.prototype.toLocaleDateString).HandleDateTimeTemporalYearMonthplumbing to compute the Intl formatting anchor from the Temporal plain value; validate Intlcalendaragainst the Temporal calendar, and model Temporal plaintimeZoneby forcing IntltimeZoneto"+00:00".PlainYearMonth.prototype.toLocaleString: returns string, invalid receiver throwsTypeError, and (with theintlfeature) different locales/options affect output; plaintimeZoneis ignored/overridden and incompatiblecalendarthrows.Testing
cargo test -p boa_engine --no-default-features --features temporal --lib plain_year_month(Temporal-only tests)cargo test -p boa_engine --features intl_bundled,temporal --lib plain_year_month(with intl)Status: rebased onto
mainafter #5080; this PR now only contains the TemporalPlainYearMonth.prototype.toLocaleStringchanges for #5083.